package com.sline.Enum;

public enum Month {
    JAN, FEB, MAR;
}

enum Month1 {
    JAN("一月"), FEB("二月"), MAR("三月");

    private String name;

    Month1(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Month1{" +
                "name='" + name + '\'' +
                '}';
    }
}

enum Month2 {
    JAN("一月") {
        public void show() {
            System.out.println("一月");
        }
    },
    FEB("二月") {
        public void show() {
            System.out.println("二月");
        }
    },
    MAR("三月") {
        public void show() {
            System.out.println("三月");
        }
    };

    private String name;

    Month2(String name) {
        this.name = name;
    }

    public abstract void show();
}